#include "stdafx.h"
#include "testSegment.h"
#include "UESegment.h"
#include "UEEntityOperation.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testSegment );


testSegment::testSegment()
{
}


testSegment::~testSegment()
{
}

void testSegment::testCreate()
{
	AcGePoint3d SegmentBase;
	AcGeVector3d SegmentDirection;
	double BaseRadiu;
	double SegmentHeight;
	CUESegment Segment;

	SegmentBase.set( 100, 0, 300 );
	SegmentDirection.set( 1, 0, 1 );
	BaseRadiu = 300;
	SegmentHeight = 150;
	Segment.Set( SegmentBase, SegmentDirection, BaseRadiu, SegmentHeight );
	AcDb3dSolid* pSolid = Segment.Create();

	Acad::ErrorStatus es = CUEEntityOperation::AddEntityToDwg(pSolid);

	if(es != Acad::eOk)
	{
		delete pSolid;
	}
	
	pSolid->close();
}